﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WomanMotion.WebApi.Infrastructure.Common
{
    /// <summary>
    /// 日期工具静态类
    /// </summary>
    public static class DateTimeTool
    {
        /// <summary>
        /// 传入日期返回中文星期
        /// </summary>
        /// <param name="date"></param>
        /// <returns></returns>
        public static string Week(DateTime date)
        {
            string[] weekdays = { "星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六" };
            string week = weekdays[Convert.ToInt32(date.DayOfWeek)];
            return week;
        }
    }
}